﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace WebApiTwo.entity
{
    public class StudentConfig : IEntityTypeConfiguration<Student>
    {
        public void Configure(EntityTypeBuilder<Student> builder)
        {
            builder.ToTable("T_Student").ToTable(p=>p.HasComment("人员信息表")).HasKey(p=>p.Id);
            builder.HasQueryFilter(p=>p.IsDeleted ==  false);
            builder.Property(p => p.RowVersion).IsRowVersion();
        }
    }
}
